package cn.edu.zafu.bigdata.zqt.studentsystem.service.impl;

import cn.edu.zafu.bigdata.zqt.studentsystem.entity.Student;
import cn.edu.zafu.bigdata.zqt.studentsystem.service.AbstractService;
import cn.edu.zafu.bigdata.zqt.studentsystem.utils.InputUtils;

/**
 * 检索学生信息
 *
 * @author zqt
 */
public class SearchStudent extends AbstractService {

    /**
     * 执行命令
     */
    @Override
    public void execute() {
        handleUserInput();
    }

    /**
     * 读取用户输入
     */
    @Override
    protected void handleUserInput() {
        Student student = InputUtils.findStudentById();
        if (student != null) {
            System.out.println("找到的学生信息如下：");
            System.out.println(student);
        }
    }
}
